package thinkinginjava.IO;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class BufferedInputFile {
	public static String read(String fileName) throws IOException {
		BufferedReader r = new BufferedReader(new FileReader(fileName));
		String line = null;
		StringBuffer sb = new StringBuffer();
		while((line = r.readLine()) != null) {
			sb.append(line + "\n");
		}
		r.close();
		return sb.toString();
	}
}
